<h3>Reply Email Form</h3>
<div class="dialog-content">
<?php echo $this->Form->create('Email', array('url' => array('action' => 'replyContact', 'controller' => 'backend'), 'id' => 'replyEmailForm')); ?>
	<input type="hidden" name="cid" value="<?php echo $contact['Comment']['id'] ?>" />
	<div class="divrow">
		<label>To</label></br>
		<input type="text" name="data[email][to]" id="email_to" class="required email" value="<?php echo $contact['Comment']['email'] ?>" />
	</div>
	<div class="divrow">
		<label>Subject</label></br><input name="data[email][subject]" id="email_subject" type="text" style="width: 90%;" class="required"/>
	</div>
	<div class="divrow">
		<label>Content</label></br><textarea name="data[email][body]" id="email_body"  class="mceEditor required" style="width: 90%"></textarea>
	</div>
	<div class="divrow"><input type="submit" value="Send Now" /><input type="button" value="cancel" id="cancel-modal" /></div>
<?php echo $this->Form->end(); ?>
</div>
<script type="text/javascript">
	jQuery(document).ready(function(){
		jQuery('#cancel-modal').click(function(){
			jQuery("#dialog-reply").empty();
			jQuery.modal.close();
		});

		jQuery("#replyEmailForm").validate();

	 	jQuery('#replyEmailForm').ajaxForm(function(response) { 
  		alert(response);
    }); 
	});
</script>

